package com.gdx.javatd;

import java.util.ArrayList;
import com.badlogic.gdx.math.Vector2;

public class Route {
	
	private ArrayList<Vector2> points;
	private int position;

	public Route() {
		points = new ArrayList<Vector2>();
		position = 0;
	}
	
	public void clear() {
		points.clear();
		position = 0;
	}
	
	public void addPoint(Vector2 point) {
		points.add(point);
	}
	
	public Vector2 getCurrent() {
		return points.get(position);
	}
	
	public Vector2 getNext() {
		if (position < points.size()) position++;
		return getCurrent();
	}

}
